package com.yuanqi.java.controller;


import com.yuanqi.java.entity.PurchaseOrderAudit;
import com.yuanqi.java.service.IPurchaseOrderAuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 采购订单审核表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-08-27
 */
@RestController
@RequestMapping("/purchase-order-audit")
public class PurchaseOrderAuditController {
    @Autowired
    private IPurchaseOrderAuditService purchaseOrderAuditService;

    @GetMapping("/{orderId}")
    public ResponseEntity<List<PurchaseOrderAudit>> listByOrder(@PathVariable Long orderId) {
        List<PurchaseOrderAudit> audits = purchaseOrderAuditService.listByOrderId(orderId);
        return ResponseEntity.ok(audits);
    }
}
